package com.yunhe.option.service.data;

import com.yunhe.option.domain.base.Area;
import com.yunhe.option.domain.data.GeneratePrice;
import com.yunhe.common.exception.ArgumentErrorException;
import com.yunhe.common.exception.ObjectNotFoundException;
import com.yunhe.common.exception.UniqueConstraintsException;
import com.yunhe.common.model.PageParam;

import java.util.List;
import java.util.Optional;

public interface GeneratePriceService {

    GeneratePrice create(GeneratePrice generatePrice)
            throws ArgumentErrorException, UniqueConstraintsException;

    void delete(Long gpId);

    GeneratePrice update(GeneratePrice generatePrice)
        throws ArgumentErrorException, UniqueConstraintsException, ObjectNotFoundException;

    GeneratePrice update(Long id,
                         String title,
                         List<Long> areaList,
                         Double windPrice,
                         Double pvPrice)
        throws ArgumentErrorException, ObjectNotFoundException, UniqueConstraintsException;

    Iterable<GeneratePrice> search(String queryStr,
                                   Long stationId,
                                   PageParam pageParam);

    Optional<GeneratePrice> findById(Long id);

    Long findTotalCount(String queryStr);

    void bindArea(GeneratePrice generatePrice, Area area);

    void bindStation(Long stationId, Long generatePriceId);
}
